1. Field of the Invention
The present invention relates to a software execution test, and more specifically to an apparatus, a method, and a storage medium for generating an input parameter corresponding to an unexecuted route of a program.
2. Description of the Related Art
Recently, with an increasing amount of software developments, there arises a strong demand for an effective method for extracting an unexecuted test route to be used to process a test item in a software development process. In addition, there also arises a demand for an effective method for extracting a condition required to execute optional software. Therefore, it is necessary to store in a database an input parameter condition for determining an execution route in block units at the execution of software, and set the condition as a determination factor for use in determining the next execution route.
In the conventional system for extracting an input parameter condition, the condition of passing an unexecuted route is determined by a user analyzing only the branch condition immediately before an unexecuted portion in a source program. Therefore, a satisfactory passage condition of an unexecuted route cannot be figured out in an environment where the branch condition is affected at other portions.
In the conventional technology, a user determines an input parameter based on the value of each type of parameter obtained during the execution of software to pass an unexecuted route. Therefore, when the scale of a program is large, it is difficult to trace a change of a parameter in the execution order of the program. As a result, it is hard for a user to guess an input parameter for passage through an unexecuted route. On the other hand, since a program development period can be shortened by detecting, with a larger program scale, an unexecuted route and efficiently checking whether or not the program is normally operating, these processes are essential factors to reduce a development cost.
Accordingly, there is a strong demand in a software development testing process for a tool capable of automatically detecting an unexecuted route portion in a program, automatically generating an input parameter for passage through the unexecuted portion, and efficiently testing a program.
The present invention aims at providing an apparatus or a method for automatically detecting an unexecuted route, and automatically generating an input condition for passage through the unexecuted route during the execution of a program.
The input parameter generation apparatus according to the present invention is an apparatus for generating input parameters when a source module comprising a plurality of functions is converted into a load module for execution. The apparatus includes: an extraction unit for extracting a route pattern which is a set of route paths passed by a process for each of the plurality of functions of the source module, relevant information about the progress of each process of the route pattern passed when the load module is executed using a specific input parameter, and result status information indicating whether or not each route pattern has been passed during the execution of the load module; a similar route determination unit for extracting from the information extracted by the extraction unit a route path not passed when the load module is executed, and extracting a route pattern similar to the route pattern containing the non-passed route path in the route pattern passed when the load module is executed, and the relevant information of the similar route pattern; and an input parameter generation unit for analyzing the source module from the similar route pattern and the relevant information of the similar route pattern, and generating a value of an input parameter for passage through a non-passed route path.
The input parameter generating method according to the present invention is a method for generating input parameters when a source module comprising a plurality of functions is converted into a load module for execution. The method includes: (a) a step of extracting a route pattern which is a set of route paths passed by a process for each of the plurality of functions of the source module, relevant information about the progress of each process of the route pattern passed when the load module is executed using a specific input parameter, and result status information indicating whether or not each route pattern has been passed during the execution of the load module; (b) a step of extracting from the information extracted in step (a) a route path not passed when the load module is executed, and extracting a route pattern similar to the route pattern containing the non-passed route path in the route pattern passed when the load module is executed, and the relevant information of the similar route pattern; and (c) a step of analyzing the source module from the similar route pattern and the relevant information of the similar route pattern, and generating a value of an input parameter for passage through a non-passed route path.
According to the present invention, the conventional process of manually analyzing a source module using a parameter obtained as a result of the execution of a load module through a debugger function can be automatically performed. Especially, the extraction unit automatically checks the source module, extracts all routes to be probably passed in a process, and also obtains parameter values, etc. used when the load module is executed. With the above described configuration entered in a database unit, the extraction unit functions as a database generation unit. Then, the similar route determination unit extracts a non-passed route path according to the information obtained by the extraction unit when the load module is executed using a specific input parameter, and determines as a similar route pattern a passed route pattern similar to the route pattern containing the route path. The input parameter generation unit generates an input parameter for passage through a non-passed route path in a process, or generates a condition to be satisfied by the input parameter.
Therefore, it is not necessary to manually analyze a source module, and the development time and the development cost can be considerably reduced when a large program is developed.